]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st-button: Don't rely on hover to accept clicks
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 6 Oct 2015 23:21:02 +0000 (01:21 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 7 Oct 2015 13:05:36 +0000 (15:05 +0200)
Since commit 4f1f226828 we only consider buttons clicked when the
release event had a corresponding press event. However as we use
the hover state to check whether a release event actually occurred
on the button, we dismiss any clicks in cases where we missed the
enter event - most likely due to some other actor holding a grab.
Instead, check whether the button contains the event's source, which
should be less error-prone.

https://bugzilla.gnome.org/show_bug.cgi?id=748919

src/st/st-button.c

index f47ce21327fbeb1f8c9d0b719d500ecd5649262e..78a931f318c9a88080d3c2541cad7880028db80e 100644 (file)
@@ -211,7 +211,7 @@ st_button_button_release (ClutterActor       *actor,
     {
       gboolean is_click;
 
-      is_click = button->priv->grabbed && st_widget_get_hover (ST_WIDGET (button));
+      is_click = button->priv->grabbed && clutter_actor_contains (actor, event->source);
       st_button_release (button, device, mask, is_click ? event->button : 0, NULL);
 
       button->priv->grabbed &= ~mask;